<?php
/**
 * Short Description  
 *
 * Long Description 
 *
 * @category   
 * @package    
 * @subpackage 
 * @copyright 
 * @author     Sandeep Manne<sandeep.manne@costrategix.com>
 */


/**
 * @see Core_Form
 */
require_once 'Core/Form/Interface.php';

abstract class Core_Form_Abstract implements Core_Form_Interface
{
    /**
     * Holds the instance of this object.
     *
     * @var Core_Form_Abstract
     */
    protected static $_instance;

    /**
     * Holds the instance of the form.
     *
     * @var Core_Form
     */
    protected $_form;

    /**
     * Class constructor - Performs the task to create the form.
     * @return unknown_type
     */
    protected function __construct($options = null)
    {
        $this->setForm($options);
    }

    /**
   	 * If translator is enabled, looks for a translation.
   	 *
   	 * @return string
   	 */
    public function __()
    {
        /**
         * @see Core_Translate
         */
        //require_once 'Core/Translate.php';
        /*if (Zend_Translate::Enabled()) {
            return Zend_Translate::translate(func_get_args());
        }

        $arguments = func_get_args();

        return $arguments[0];*/
    }

    /**
     * Get route part for provided key
     *
     * @param string $route
     * @return string | boolean
     */
    public function getRoute($route)
    {
        return '/' . Zend_Controller_Front::getInstance()->getRouter()
                                                         ->getRoute($route)
                                                         ->assemble();
    }

    /**
     * Sets the form object.
     *
     * @return Core_Form_Abstract
     */
    abstract public function setForm($options);
}
